<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core3" prefix="select"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/dict" prefix="dict" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!-- search area   -->
<div class="row searchLineWrap">
	<form class="form-horizontal" method="post" action="getMenusByCondition" id="searchForm">
		  <div class="row">
		    <div class="col-md-4">
		      <div class="form-group">
		         <label  class="col-md-4 control-label"><s:text name="menu.menu_zh_name"/></label>
		         <div class="col-md-8">
		            <input type="text" class="form-control" name="menu_zh_name" placeholder="<s:text name="menu.menu_zh_name"/>"/>
		         </div>
		       </div>
		    </div>
	    
			<div class="col-md-4">
		      <div class="form-group">
		         <label  class="col-md-4 control-label"><s:text name="menu.menu_en_name"/></label>
		         <div class="col-md-8">
		         	<input type="text" class="form-control" name="menu_en_name" placeholder="<s:text name="menu.menu_en_name"/>"/>
		         </div>
		       </div>
		    </div>
		    
		    <div class="col-md-4">
		      <div class="form-group">
		         <label  class="col-md-4 control-label"><s:text name="menu.url"/></label>
		         <div class="col-md-8">
		         	<input type="text" class="form-control" name="url" placeholder="<s:text name="menu.url"/>"/>
		         </div>
		       </div>
		    </div>
		  </div>
		  
		  <div class="row">
			<div class="col-md-4">
		      <div class="form-group">
		         <label  class="col-md-4 control-label"><s:text name="menu.imageURL"/></label>
		         <div class="col-md-8">
		         	<input type="text" class="form-control" name="imageURL" placeholder="<s:text name="menu.imageURL"/>"/>
		         </div>
		       </div>
		    </div>
		    
		    <div class="col-md-4">
		      <div class="form-group">
		         <label  class="col-md-4 control-label"><s:text name="common.createtime"/></label>
		         <div class="col-md-8">
		         	<input type="text"  class="laydate-icon form-control layer-date" onclick="laydate()" name="createtime" placeholder="<s:text name="common.createtime"/>"/>
		         </div>
		       </div>
		    </div>
		    
		    <div class="col-md-4">
		      <div class="form-group">
		         <label  class="col-md-4 control-label"></label>
		         <div class="col-md-8">
		         	<button type="button" class="btn btn-primary pull-left" onclick="ajaxForm('content','searchForm')">
		          	<i class="fa fa-search m-l-sm m-r-xs"></i><s:text name="common.search"/></button>
		         </div>
		       </div>
		    </div>
		  </div>
	</form>
</div>
<!-- search area end  -->

<div class="row searchLineWrap">
		<p><a href="javascript:void(0);" onClick="ajaxContent('redirectMenu');" class="btn btn-primary pull-left"><s:text name="menu.addMenu"/></a><div class="clearfix"></div></p>
	<table class="table table-bordered table-hover dataTables-example">
	    <thead>
	        <tr>
	            <th><s:text name="menu.menu_zh_name"/></th>
	            <th><s:text name="menu.menu_en_name"/></th>
	            <th><s:text name="menu.url"/></th>
	            <th><s:text name="menu.imageURL"/></th>
	            <th><s:text name="common.createtime"/></th>
	            <th><s:text name="common.updatetime"/></th>
	            <th><s:text name="common.operate"/></th>
	        </tr>
	    </thead>
	    <tbody>
	    	<s:iterator value="#request.menus">
	    		<tr>
	    			<td>${menu_zh_name }</td>
	    			<td>${menu_en_name }</td>
	    			<td>${url }</td>
	    			<td ><div class="${imageURL }" style="margin-left: 35px;margin-top: 10px;border-style: none;"></div></td>
	    			<td><fmt:formatDate value="${createtime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
	    			<td><fmt:formatDate value="${updatetime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
	    			<td>
						<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('viewUser?userID=${menuID}');"><s:text name="common.view"/></button>
						<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('getMenuById?menuID=${menuID}')"><s:text name="common.edit"/></button>
						<button type="button" class="btn btn-sm btn-link" onClick="ajaxDelete('deleteMenu?menuID=${menuID}','content')"><s:text name="common.delete"/></button>
					</td>
	    		</tr>
	    	</s:iterator>
	    </tbody>
	</table>
	<%-- <div style="padding-right: 80%;">
		<ul class="pagination">
			<li><a href="#">&laquo;</a></li>
			<s:bean name="org.apache.struts2.util.Counter" id="counter">
			    <s:param name="first" value="1" />
			    <s:param name="last" value="#request.pageCount" />
			    <s:iterator>
			    	<li><a href="#"><s:property/></a></li>
			    </s:iterator>
			</s:bean>
			<li><a href="#">&raquo;</a></li>
		</ul>
	</div> --%>
</div>
